<?php

class sidebar{
    
    public function style($option){
        if($option=='grid-4'):
            
          ?><style type="text/css" media="screen">
                .widget { width: 282px;}
                .widget .titulo {width: 260px;}
            </style>
           <?php
            
        elseif($option=="grid-2"):
            
          ?><style type="text/css" media="screen">
                .widget { width: 242px;background: #fff;}
                .widget .titulo {width: 220px;}
            </style>
           <?php            
            
        endif;                
    }
    
    public function get_facebook($width=282,$height=180){
       ?>
        <div class="widget">
            <div class="titulo">
                <h3>CCNM no Facebook</h3>
            </div>
            <div class="widget-box like-box">
               <div class="fb-like-box" data-href="http://www.facebook.com/pages/CCNM/192960927500366" data-width="<?php echo $width;?>" 
                    data-height="<?php echo $height;?>" data-show-faces="true" data-stream="false" data-header="false">
               </div>
            </div>                                
        </div>           
           
       <?php
    }
    

    public function get_mais_vistos($limit=5){
        ?>
        
        <div class="widget">
            <div class="titulo">
                <h3>Mais Vistos <strong class="font-Cipher font-14">(Top <?php echo $limit; ?>)</strong></h3>
            </div>
            <div class="widget-box mais-visitados">
                <ol>
                    <?php if(function_exists('get_most_viewed')) get_most_viewed('both', $limit); ?>
                </ol>
            </div>                                
        </div>              
            
        <?php
        
    }

    
    public function get_tag_cloud($limit=30, $small=12, $large=18){
        ?>
            
    <div class="widget">
        <div class="titulo">
            <h3>Tags</h3>
        </div>
        <div class="widget-box tag-cloud">
            <?php wp_tag_cloud("smallest=$small&largest=$large&number=$limit"); ?>
        </div>                                
    </div>              
            
        <?php
    }
    
    public function get_bookmarks($limit=10){
        ?>

    <div class="widget">
        <div class="titulo">
            <h3>Links</h3>
        </div>
        <div class="widget-box links">
            <?php  wp_list_bookmarks("title_li=&categorize=0&orderby=rand&limit=$limit"); ?>
        </div>                                
    </div>  
            
         <?php
    }
    
    public function enquete(){
        ?>


            <div class="widget">
                <div class="titulo">
                    <h3>Enquete</h3>
                </div>
                <div class="widget-box enquete">

                <?php get_poll(); ?>

                </div>                                
            </div>              
            
        <?php
    }
    
    
    
}